//
//  HRMyCollectTableViewCell.m
//  haierapp
//
//  Created by Xia Zhiyong on 14-8-11.
//  Copyright (c) 2014年 haier. All rights reserved.
//

#import "HRMyCollectTableViewCell.h"
#import "HRProductInfo.h"

@implementation HRMyCollectTableViewCell

- (void)awakeFromNib
{
    // Initialization code
}

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = (HRMyCollectTableViewCell *)[[[NSBundle mainBundle] loadNibNamed:@"HRMyCollectTableViewCell"
                                                                        owner:self
                                                                      options:nil] objectAtIndex:0];
    return self;

}

-(void)configWithData:(id)data{
    HRProductInfo *info = (HRProductInfo *)data;
    if (info.picMinPath) {
        [_imgIcon setImageWithURL:[NSURL URLWithString:info.picMinPath] placeholderImage:[UIImage imageNamed:IMAGENAME_PLACE_HODLE]];
    }
    _lblName.text = [NSString stringWithFormat:@"%@",info.name];
    _lblPrice.text = [NSString stringWithFormat:@"¥%@",info.price];
    _lblCollectNum.text = [NSString stringWithFormat:@"%@人收藏",info.serchCount];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
